﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace clean
{
    class Program
    {
        static void Clean(string path)
        {
            foreach (var dir in new DirectoryInfo(path).GetDirectories())
            {
                Console.WriteLine(dir.Name);
                if (dir.Name == "bin" || dir.Name == "obj")
                    dir.Delete(true);
                else Clean(dir.FullName);
            }
            foreach (var file in new DirectoryInfo(path).GetFiles())
                if (file.Name.EndsWith(".pdb") || file.Name.EndsWith(".suo"))
                    file.Delete();
        }

        static void Main(string[] args)
        {
            var path = AppDomain.CurrentDomain.BaseDirectory;
            Console.WriteLine(path);
            Clean(path);
        }
    }
}
